package com.dai.zhenfujin.adapter;

import android.content.Context;

import com.bumptech.glide.Glide;
import com.dai.zhenfujin.BaseAdapter.BaseRecycleAdapter;
import com.dai.zhenfujin.BaseAdapter.BaseViewHolder;
import com.dai.zhenfujin.bean.TypeListBean;

import java.util.List;

import de.hdodenhof.circleimageview.CircleImageView;

public class TypeListAdapter extends BaseRecycleAdapter<TypeListBean.TypelistBean> {
    private List<TypeListBean.TypelistBean> dataList;
    private Context mContext;
    private BaseViewHolder.onItemCommonClickListener commonClickListener;



    public TypeListAdapter(Context context, List<TypeListBean.TypelistBean> dataList, BaseViewHolder.onItemCommonClickListener commonClickListener) {
        super(context, dataList, com.dai.zhenfujin.R.layout.itme_type_list);
        this.dataList = dataList;
        this.commonClickListener = commonClickListener;
        mContext = context;
    }

    @Override
    public void bindData(BaseViewHolder holder, TypeListBean.TypelistBean data) {
        holder.setText(com.dai.zhenfujin.R.id.tv_type_name, data.getT_name());
        Glide.with(mContext).load(data.getT_url()).into((CircleImageView)holder.getView(com.dai.zhenfujin.R.id.iv_type));


    }
}